package com.bsoft.gol.hcs.specialist.entity;

import javax.persistence.*;
import java.util.Objects;

/**
 * @description:
 * @author: zhengcb10708
 * @create: 2021-11-02 11:13
 **/
@Entity
@Table(name = "exam_report_image")
public class ExamReportImage {
    private long examReportImageId;     //主键id
    private String examReportId;        //检查报告id关联表exam_report.exam_report_id字段
    private String imageNo;             //图像编号
    private String imageNotes;          //图像说明
    private Integer displayOrder;       //显示顺序
    private String imageFormat;         //图像格式
    private String imageSize;           //图像规格
    private String dataStorageMode;     //数据存储方式
    private String imageLocalUrl;       //图像文件存储路径
    private String imageData;           //图像内容

    @Id
    @Column(name = "exam_report_image_id")
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public long getExamReportImageId() {
        return examReportImageId;
    }

    public void setExamReportImageId(long examReportImageId) {
        this.examReportImageId = examReportImageId;
    }

    @Basic
    @Column(name = "exam_report_id")
    public String getExamReportId() {
        return examReportId;
    }

    public void setExamReportId(String examReportId) {
        this.examReportId = examReportId;
    }

    @Basic
    @Column(name = "image_no")
    public String getImageNo() {
        return imageNo;
    }

    public void setImageNo(String imageNo) {
        this.imageNo = imageNo;
    }

    @Basic
    @Column(name = "image_notes")
    public String getImageNotes() {
        return imageNotes;
    }

    public void setImageNotes(String imageNotes) {
        this.imageNotes = imageNotes;
    }

    @Basic
    @Column(name = "display_order")
    public Integer getDisplayOrder() {
        return displayOrder;
    }

    public void setDisplayOrder(Integer displayOrder) {
        this.displayOrder = displayOrder;
    }

    @Basic
    @Column(name = "image_format")
    public String getImageFormat() {
        return imageFormat;
    }

    public void setImageFormat(String imageFormat) {
        this.imageFormat = imageFormat;
    }

    @Basic
    @Column(name = "image_size")
    public String getImageSize() {
        return imageSize;
    }

    public void setImageSize(String imageSize) {
        this.imageSize = imageSize;
    }

    @Basic
    @Column(name = "data_storage_mode")
    public String getDataStorageMode() {
        return dataStorageMode;
    }

    public void setDataStorageMode(String dataStorageMode) {
        this.dataStorageMode = dataStorageMode;
    }

    @Basic
    @Column(name = "image_local_url")
    public String getImageLocalUrl() {
        return imageLocalUrl;
    }

    public void setImageLocalUrl(String imageLocalUrl) {
        this.imageLocalUrl = imageLocalUrl;
    }

    @Basic
    @Column(name = "image_data")
    public String getImageData() {
        return imageData;
    }

    public void setImageData(String imageData) {
        this.imageData = imageData;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        ExamReportImage that = (ExamReportImage) o;
        return examReportImageId == that.examReportImageId &&
                Objects.equals(examReportId, that.examReportId) &&
                Objects.equals(imageNo, that.imageNo) &&
                Objects.equals(imageNotes, that.imageNotes) &&
                Objects.equals(displayOrder, that.displayOrder) &&
                Objects.equals(imageFormat, that.imageFormat) &&
                Objects.equals(imageSize, that.imageSize) &&
                Objects.equals(dataStorageMode, that.dataStorageMode) &&
                Objects.equals(imageLocalUrl, that.imageLocalUrl) &&
                Objects.equals(imageData, that.imageData);
    }

    @Override
    public int hashCode() {
        return Objects.hash(examReportImageId, examReportId, imageNo, imageNotes, displayOrder, imageFormat, imageSize, dataStorageMode, imageLocalUrl, imageData);
    }
}
